package com.zitangkou.user.local;

import com.zitangkou.common.global.UserContent;

/**
 * @author Deng Ningning
 * @version 1.0
 * @date 2020/9/15 21:11
 */
public class UserThreadLocal {

    private UserThreadLocal() {
    }

    private static final ThreadLocal<UserContent> threadLocal = new ThreadLocal<>();

    public static void setUserInfo(UserContent userContent) {
        threadLocal.set(userContent);
    }

    public static UserContent getUserInfo() {
        return threadLocal.get();
    }

    public static void removeUserInfo() {
        threadLocal.remove();
    }

}
